<template>
  <div>
    <Chart :cdata="cdata" />
  </div>
</template>

<script>
import Chart from './chart.vue';
import {getOut} from "@/axios/api";

export default {
  data () {
    return {
      cdata: [
        {
          name: '五华区',
          value: 500,
        },
        {
          name: '盘龙区',
          value: 200,
        },
        {
          name: '官渡区',
          value: 300,
        },
        {
          name: '西山区',
          value: 400,
        },
        {
          name: '东川区',
          value: 2,
        },
        {
          name: '呈贡区',
          value: 50,
        },
        {
          name: '晋宁区',
          value: 4,
        },
        {
          name: '富民县',
          value: 3,
        },
        {
          name: '宜良县',
          value: 2,
        },
        {
          name: '石林彝族自治县',
          value: 2,
        },
        {
          name: '嵩明县',
          value: 2,
        },
        {
          name: '禄劝彝族苗族自治县',
          value: 2,
        },
        {
          name: '寻甸回族彝族自治县',
          value: 2,
        },
        {
          name: '安宁市',
          value: 300,
        }
      ]
    }
  },
  components: {
    Chart,
  },
  mounted () {
    this.getout()
  },
  methods: {
    async getout(){
      let date = await getOut().then(res=>res.data)
      this.cdata = date
    }
  }
}
</script>

<style lang="scss" scoped>
</style>
